import request from '@utils/request'

// 请求所有的分类接口
const fetchCates = (params = {}) => request.get('/shop/goods/category/all', { params })
// 请求banner数据
const fetchHomeBanners = (params = {}) => request.get('/banner/list', { params })
// 请求推荐商品数据
const fetchItems = (params = {}) => request.post('/shop/goods/list', params)
const fetchDetail = (id) => request.get('/shop/goods/detail', { params: { id } })

export { fetchCates, fetchHomeBanners, fetchItems, fetchDetail }
